package org.javaboy.security01_demo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;

@Configuration
public class SecurityConfig {

    @Bean
    public InMemoryUserDetailsManager inMemoryUserDetailsManager() {
        return new InMemoryUserDetailsManager(User.withUsername("zhangsan")
                // {noop} 表示这个密码没有加密
                .password("{noop}123").build(), User.withUsername("lisi").password("{noop}123").build());
    }
}
